let session = require('koa-session');

let SESSION_CONFIG = {
  key: 'mbtestplatform:sess',
  maxAge: 1000 * 60 * 60 * 24 * 7,
  overwrite: true,
  httpOnly: true,
  signed: true,
  rolling: false,
  renew: false
}

module.exports = app => {
  //session中间件设置
  app.keys = ["mbtest2018"]
  return session(SESSION_CONFIG, app)
};